<template>
  <div>
    <a-table rowKey="id" bordered size="middle" :columns="columns" :dataSource="dataSource" :pagination="false">
      <div slot="percent" slot-scope="text, record">
        {{text}}%
      </div>
    </a-table>
  </div>
</template>

<script>
import { getAction } from '@api/manage'

export default {
  name: 'ExpertProgress',
  components: {},
  props: {
    sectionId: {},
    businessId: {}
  },
  data () {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '专家',
          align: 'center',
          dataIndex: 'expertName'
        },
        {
          title: '进度',
          align: 'center',
          dataIndex: 'percent'
        }
      ],
      list: [],
      url: {
        list: '/exPingbiao/exPingbiaoExpert/bidEvaluation/progress'
      },
      sectionId: null,
      dataSource: []
    }
  },

  computed: {},
  mounted(){
    this.queryList();
  },
  methods: {
    ok () {
      this.$emit('confirm')
    },
    queryList () {
      getAction(this.url.list + `?sectionId=${this.sectionId}&businessId=${this.businessId}`, { pageSize: 9999 })
        .then((res) => {
          if (res.success) {
            this.dataSource = res.result.records || res.result
          } else {
            this.$message.warning(res.message)
          }
        })
        .finally(() => {
          this.loading = false
        })
    }
  },
  created () {}
}
</script>

<style scoped>
</style>


